import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import home from '@/views/home'
import search from '@/views/search'
import detail from '@/views/detail'
import homePage from '@/views/homePage'
import mine from '@/views/mine'
import enjoyLive from '@/views/enjoyLive'
import activeList from '@/views/activeList'
var routes = [
    {
        path:'/',
        redirect:'/homepage',
    },
    {//首页
        path:'/homepage',
        component:homePage,
        meta:{
            showTabBar:true
        }
    },
    {//首页新闻列表
        path:'/home',
        component:home,
        name:'home',
        meta:{
            showTabBar:true
        }
    },
    {//搜索页面
        path:'/search',
        component:search,
        meta:{
            showTabBar:true
        }
    },
    {//详情页
        path:'/detail/:id',
        component:detail,
        name:'detail',
        meta:{
            showTabBar:true
        }
    },
    {//我的页面
        path:'/mine',
        component:mine,
        name:'mine',
        meta:{
            showTabBar:true
        }
    },
    {//享生活页面
        path:'/enjoylive',
        component:enjoyLive,
        meta:{
            showTabBar:true
        }
    },
    {//活动列表页面
        path:'/activeList',
        component:activeList,
        name:'activeList',
        meta:{
            showTabBar:false
        }
    }
]

var router = new VueRouter({
    routes,
})
export default router